//
//  TSBaseView.swift
//  CMDB
//
//  Created by 王磊 on 09/05/2017.
//  Copyright © 2017 CMDB. All rights reserved.
//

import UIKit

class TSBaseView: UIView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setUp()
        
        addOwnSubviews()
        
        configOwnSubviews()
        
        buildSubViews()
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    weak var unsureTarget : AnyObject?
    
    var unsureAction : Selector?
    
    var unsureControlEvent: ControlEvent?
    
}
extension TSBaseView: ControlEventDelegate {}

extension TSBaseView {
    
    func addTarget(target: AnyObject, action: Selector, controlEvent: ControlEvent) {
        
        unsureTarget = target
        
        unsureAction = action
        
        unsureControlEvent = controlEvent
    }
}
